home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1994 April
/
1994-04b.d64
/
putt putt
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
13KB
|
446 lines
10 rem ****************************
20 rem *** ***
30 rem ** miniature golf v.2 **
40 rem *** ***
50 rem ****************************
60 rem idea conceived and written
70 rem by wvmike. v.2 as modified
80 rem and enhanced by b29gunner.
90 rem more enhancements planned.
100 :
110 s=54272:p1u=s+1:w1u=s+3:f1w=s+4:a1d=s+5:s1r=s+6:p2l=s+7
120 u2p=s+8:l2w=s+9:p2u=s+10:f2w=s+11:a2d=s+12:s2r=s+13
130 :
140 vol=s+24
150 rem ^^^ standard sid asddresses ^^^
160 :
170 gosub230:rem instructions
180 gosub850:rem setup
190 gosub2770:rem play!
200 goto3790:rem !end!
210 end
220 :
230 :
240 :rem *** insts ***
250 :
260 poke53281,15:poke53280,15
270 input"[147][144]do you need instructions (y/n):";yn$
280 ifyn$="n"thenprint"please wait...":return
290 ifyn$<>"y"then270
300 print"[147][144]"tab(8)"*** miniature golf ***"
310 print:print
320 print"welcome to the alberts country club. this beautiful nine-hole ";
330 print"miniature golf course is open and waiting for you !"
340 print
350 print"you should know the rules of the course before you begin play !"
360 print
370 print"to putt the ball,you have to input which way you want to ";
380 print"aim it."
390 print"there are 8 directions with the ball assumed at * (see below):
400 [153]:[153][163]17)"2 1 8":[153][163]17)"3 * 7":[153][163]17)"4 5 6"
410 [153]:[153]:[153]"press return when ready to continue"
420 [161]x$:[139]x$[179][177][199](13)[167]420
430 [153]"load"
440 [153][163]9)"*** miniature golf ***
450 print:print
460 print"then you must input how hard to hit the ball. the speed should ";
470 print"be some number between 0.00 and 5.00. for example, youcould";
480 print" hit the ball a relative speed of 3.2"
490 print
500 print"it will take a few tries before you get used to how hard to putt ";
510 print"the ball.":print
520 print"also, there are four types of hazards onthe course. you should ";
530 print"be aware of whatthey are and what affect they have on you ";
540 print"and your ball."
550 print:print:print:print"press return when ready to continue"
560 getx$:ifx$<>chr$(13)then560
570 print"[147]"
580 printtab(9)"*** miniature golf ***
590 [153]:[153]
600 [153]"blocks: these are like walls. you must putt around them."
610 [153]
620 [153]"yellow traps represent sand. your ball cannot penetrate through ";
630 [153]"a sand trap. the penalty for landing in the sand is one stroke."
640 [153]
650 [153]"water: like sand, these blue hazards will stop your ball.";
660 [153]" the penalty for landing in water is one stroke."
670 [153]
680 [153]"uneven surfaces: these red hazards causethe ball to roll in ";
690 [153]"a direction which isunpredictable there is no penalty ";
700 [153]"forhitting this hazard."
710 [153]:[153]:[153]"press return when ready to continue"
720 [161]x$:[139]x$[179][177][199](13)[167]720
730 [153]"loadprint#"
740 [153][163]9)"*** miniature golf ***
750 print:print
760 print"[144]you are trying to sink the ball in as few tries as possible. ";
770 print"the hole is the black square."
780 print
790 print"[144]if you hit the ball too hard, it will jump over the hole and ";
800 print"continue rolling.it may also change direction, so be sureto hit ";
810 print"the ball just hard enough."
820 print:print:print"press return when ready to continue"
830 getx$:ifx$<>chr$(13)then830
840 return
850 :
860 :rem *** setup ***
870 :
880 rem store fanfare notes
890 dim yy(12),zz(12)
900 fori=1to12:readyy(i),zz(i):nexti
910 data 25,30,18,209,33,135,25,30,42,62,31,165,50,60,37,162,42,62,31,165
920 data 50,60,37,162
930 dimha(9,5):fori=1to9:forj=1to5:readha(i,j):next:next
940 data 0,0,0,0,2
950 data 1,0,0,0,3
960 data 0,1,0,0,3
970 data 1,1,0,0,3
980 data 0,0,0,1,3
990 data 0,0,1,1,3
1000 data 1,0,1,0,3
1010 data 0,1,1,0,4
1020 data 0,0,1,1,3
1030 dimdi(8,2):fori=1to8:readdi(i,1),di(i,2):next
1040 data 0,-1,-1,-1,-1,0,-1,1,0,1,1,1,1,0,1,-1
1050 plt=49152:fori=0to24:readc:pokeplt+i,c:nexti
1060 data 32,16,192,132
1070 data 253,32,16,192
1080 data 152,170,164,253
1090 data 24,76,240,255
1100 data 32,253,174,32
1110 data 158,173,76,170,177
1120 dimv(8):fori=1to8:readv(i):next:data-40,-41,-1,39,40,41,1,-39
1130 def fnsc(x)=peek(1024+bx+40*by+x)
1140 def fnco(x)=peek(55296+bx+40*by+x)and15
1150 return
1160 rem *** hole 1 ***
1170 print"":ts=0
1180 printtab(10)"[144][172][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][187]"
1190 fori=1to15
1200 printtab(10)"[161] [146][144][161]"
1210 next
1220 printtab(10)"[144][188][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][146][190]"
1230 print""tab(19)" "
1240 by=16:bx=11+int(17*rnd(0)):sysplt,bx,by:print"[209]";
1250 return
1260 rem *** hole 2 ***
1270 print"":ts=0
1280 printtab(8)"[144][172][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][187]"
1290 fori=1to5
1300 printtab(8)"[161] [146][144][161]"
1310 next
1320 printtab(8)"[161] [144][172][162][162][162][162][162][162][162][162][162][146][190]"
1330 printtab(8)"[161] [146][144][161]"
1340 printtab(8)"[161] [146][144][161]"
1350 printtab(8)"[161] [146][144][161]"
1360 printtab(8)"[161] [146][144][161]"
1370 fori=1to6
1380 printtab(8)"[161] [146][144][161]"
1390 next
1400 printtab(8)"[188][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][146][190]"
1410 by=17:bx=9+int(15*rnd(0)):sysplt,bx,by:print"[209]";
1420 print""tab(30)"[144] "
1430 return
1440 rem *** hole 3 ***
1450 print"":ts=0
1460 printtab(20)"[144][172][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][187]"
1470 fori=1to5
1480 printtab(20)"[161] [146][144][161]"
1490 next
1500 printtab(8)"[146][172][162][162][162][162][162][162][162][162][162][162][162][190] [146][144][161]"
1510 printtab(8)"[161] [146][144][161]"
1520 printtab(8)"[161] [158] [146][144][161]"
1530 printtab(8)"[161] [158] [146][144][161]"
1540 printtab(8)"[161] [158] [146][144][161]"
1550 printtab(8)"[161] [158] [146][144][161]"
1560 printtab(8)"[161] [144][172][162][162][162][162][162][162][162][162][162][162][162][146][190]"
1570 fori=1to4
1580 printtab(8)"[161] [146][144][161]"
1590 next
1600 printtab(8)"[146][188][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][146][190]"
1610 print""tab(32)"[144] "
1620 by=17:bx=9+int(15*rnd(0)):sysplt,bx,by:print"[209]"
1630 return
1640 rem *** hole 4 ***
1650 print"":ts=0
1660 printtab(7)"[144][172][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][187]"
1670 fori=1to6
1680 printtab(7)"[161] [146][144][161]"
1690 next
1700 printtab(7)"[161] [144][172][162][162][162][162][162][162][162][162][162][187][146] [146][144][161]"
1710 fori=1to4
1720 printtab(7)"[161] [144][146][161] [161] [146][144][161]"
1730 next
1740 printtab(7)"[161] [144][188][146][162][162][162][187] [188][162][162][162][162][162][162][162][162][162][162][162][146][190]"
1750 fori=1to3
1760 printtab(7)"[161] [144][146][161]"
1770 next
1780 printtab(7)"[188][162][162][162][162][162][162][162][162][162][162][162][146][190]"
1790 print""tab(18)"[158] [157][157][157][157][157][157] [157][157][157][157]"
1800 printtab(25)"[157][157][157] [157][157][157][157][157] [157][157] "
1810 sysplt,32,11:print"[144] "
1820 by=16:bx=8+int(10*rnd(0)):sysplt,bx,by:print"[209]"
1830 return
1840 rem *** hole 5 ***
1850 print""
1860 print"":ts=0
1870 printtab(10)"[144][172][162][162][162][162][162][162][162][162][162][162][162][162][162][162][